import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class demo7 {
    public static void main(String[] args) {

        Map<String, List<Integer>> temp=new HashMap<>();
        List<Integer> list=new ArrayList<>();
        list.add(85);
        list.add(90);
        list.add(95);

        temp.put("John",list);

        list=new ArrayList<>();
        list.add(85);
        list.add(90);
        list.add(100);

        temp.put("Mike",list);
        func(temp);
    }

    public static Map<String,Double> func(Map<String, List<Integer>> temp){
        Map<String,Double> ret=new HashMap<>();

        for(Map.Entry<String,List<Integer>> x:temp.entrySet()){
            double avg=0;
            for(Integer score:x.getValue()){
                avg=avg+(double)score;
            }
            ret.put(x.getKey(),avg/3.0);
        }
        return ret;
    }
}
